Method and apparatus for tuning a PID controller

ABSTRACT

In tuning a PID controller for a process in a feedback control system, a method is provided for bringing the system into symmetric self-excited oscillations for measuring the frequency and the amplitude of the oscillations, and tuning the controller in dependence on the measurements obtained. A control algorithm referred to as the modified relay feedback test is introduced into a system in series with a process to generate self-excited oscillations. Tuning includes the steps of selecting a desired gain margin or phase margin, generating oscillations with the algorithm parameter corresponding to a selected gain or phase margin, measurements of the amplitude and the frequency of these oscillations, and computing PID controller tuning parameters. Data and formulas are given for the computation of the specific parameter of the modified relay feedback test and for tuning the parameters of the PID controller. An apparatus for performing the method is disclosed.

CROSS-REFERENCE TO RELATED APPLICATIONS

U.S. Patent Documents: 4,214,300 July, 1980 Barlow et al. 364/105.4,549,123 October, 1985 Hagglund et al. 364/157. 4,602,326 July, 1986Kraus 364/158. 4,754,391 June, 1988 Suzuki 364/157. 4,836,319 June, 1989Haseda et al. 180/142. Re33267 July, 1990 Kraus 364/158. 5,124,626 June,1992 Thoen 364/161. 5,222,022 June, 1993 Adams et al. 364/431. 5,223,778June, 1993 Svarovsky et al. 364/157. 5,229,699 July, 1993 Chu et al.364/162. 5,283,729 February, 1994 Lloyd 364/157. 5,311,421 May, 1994Nomura et al. 364/157. 5,325,288 June, 1994 Satou 364/162. 5,396,415March, 1995 Konar et al. 364/162. 5,412,557 May, 1995 Lauw 363/37.5,453,925 September, 1995 Wojsznis et al. 364/157. 5,535,117 July, 1996Hiroi 364/158. 5,568,377 October, 1996 Seem et al. 364/157. 5,587,899December, 1996 Ho et al. 364/157. 5,587,896 December, 1996 Hansen et al.700/28 5,742,503 April, 1998 Yu 700/42 7,035,695 April, 2006 Boiko700/28 7,249,882 July, 2007 Lin 374/101

Other References

-   Cheng et al., 1999, Identification and Control of Nonlinear Systems    Using Multiple Models: Relay Feedback Approach. Proc. American    Control Conference 1999, 3327-3331.-   Chiang et al., 1992, Derivation of Transfer Function from Relay    Feedback Systems. Ind. Eng. Chem. Res. 31, 855-860.-   I. Boiko, Discontinuous Control Systems: Frequency-Domain Analysis    and Design, Boston, Birkhauser, 212 p., 2009.

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

Not Applicable

Reference to Sequence Listing, a Table, or a Computer Program ListingCompact Disk Appendix

Not Applicable

BACKGROUND OF THE INVENTION

Despite the apparent success of advanced process control, theproportional-integral-derivative (PID) control still remains the maintype of control in the process industries. PID controllers and theirvariations such as proportional-integral (PI), proportional-derivative(PD), and proportional (P) controllers are implemented as eitherstand-alone controllers or configurable software modules within thedistributed control systems (DCS). The DCS software is constantlyevolving providing a number of new features, among which the controllerautotuning functionality is one of most useful.

Tuning of PID controllers based on relay feedback tests proposed byAstrom and Hagglund in 1981 (respective U.S. Pat. No. 4,549,123 issuedin 1985) received a lot of attention after that (W. L. Luyben,“Derivation of Transfer Functions for Highly Nonlinear DistillationColumns”, Ind. Eng. Chem. Res. 26, 1987, pp. 2490-2495; Tore Hagglund,Karl J. Astrom, “Industrial Adaptive Controllers Based on FrequencyResponse Techniques”, Automatica 27, 1991, pp. 599-609). It identifiesthe important dynamic information, ultimate gain and ultimate frequency,in a straightforward manner. The success of this type of tuners lies onthe fact that they are simple and reliable. These features of the relayfeedback autotuning have lead to a number of commercial tuners (ToreHagglund, Karl J. Astrom, “Industrial Adaptive Controllers Based onFrequency Response Techniques”, Automatica 27, 1991, pp. 599-609) andindustrial applications (H. S. Papastathopoulou, W. L. Luyben, “TuningControllers on Distillation Columns with the Distillate-BottomsStructure”, Ind. Eng. Chem. Res. 29, 1990, pp. 1859-1868).

Despite the apparent success of relay based tuning, it can lead toreduced or vice versa excessively large gain and phase margins becauseof the choice of the test point (frequency of the oscillations)corresponding to the phase lag of the process equal to −180° (phasecross-over frequency ω_(π)) while inclusion of the controller in theloop introduces additional phase shift, which was not accounted for atthe selection of the test point and designing the tuning rules.

BRIEF SUMMARY OF THE INVENTION

The present invention completely eliminates this source of inaccuracyvia the selection of a different test point, development of the test forexcitation of oscillation in the selected test point, and designing thetuning rules that account for the phase shift due to the controllerintroduction. Therefore, the proposed test and tuning rules ensure thateither the specified gain margin of the system or the specified phasemargin of the system will be provided. The present invention defines amethod and an apparatus for bringing the system (comprising the process,and the developed control algorithm) into symmetric oscillations(further referred to as modified relay feedback test) for determining(measuring) quantities essential for the tuning of the controller. Themethod is based on the measurement of the frequency and the amplitude ofthe oscillations in the system under the modified relay feedback testand calculation of the controller tuning parameters in dependence on themeasurements obtained. The invention includes all variations andcombinations (P, PI, PID, etc.) of the control type of the PIDcontroller.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWING

FIG. 1. Nyquist plots for process (1) and first-order-plus-dead-time(FOPDT) approximation (3).

FIG. 2. Nyquist plots for open-loop system with PI controller andprocess.

FIG. 3. Modified relay feedback test.

FIG. 4. Finding periodic solution.

FIG. 5. Modified RFT and tuning with specification on phase margin.

FIG. 6. Nyquist plots of open-loop systems for Example 2.

FIG. 7. Embodiment of the controller and the process.

DETAILED DESCRIPTION OF THE INVENTION

Referring to the drawings, a description will be given of an embodimentof a controller tuning method according to the present invention.

The practice of the use of tuning algorithms shows that simplenon-parametric methods (the ones that are not based on any model of theprocess) such as Ziegler-Nichols's closed-loop tuning method (J. G.Ziegler, and N. B. Nichols, “Optimum settings for automaticcontrollers”, Trans. Amer. Soc. Mech. Eng., Vol. 64, 1942, pp. 759-768)and Astrom-Hagglund's relay feedback test (RFT) (K. J. Astrom and T.Hagglund, “Automatic tuning of simple regulators with specifications onphase and amplitude margins,” Automatica, 20, 1984, p. 645-651) providea satisfactory and consistent performance even in the conditionscharacterized by the presence of measurement noise and varyingdisturbances, when deterioration of more sophisticated methods becomessignificant. However, the use of only ultimate gain and frequency cannotensure sufficient accuracy of tuning There is one more factor thatcontributes to the issue of relatively low precision. This is the factthat the test point in the closed-loop test is selected to be the one inwhich the phase characteristic of the process is equal to −180° (phasecross-over frequency ω_(π)). This approach does not account for thechange of frequency ω_(π) due to the controller introduction, which isthe factor that contributes to the deterioration of tuning accuracy.

The present invention aims to introduce a tuning method in which theabove-noted problem of the cross-over frequency shift is compensated forby the respective design of the modified relay feedback test (modifiedRFT). Respective tuning rules matching to the modified relay feedbacktest are also proposed that allows for the better accuracy of tuning

It has been a popular notion that the most important point on thefrequency response of the system is the point where the phasecharacteristic of the process is equal to −180° (phase cross-overfrequency ω_(π)). However, in publication (I. Boiko, “Modified relayfeedback test and its use for non-parametric loop tuning” Proc. 2008American Control Conference, Seattle, Jun. 11-13, 2008, pp. 4755-4760)it was shown that this point remains the most important one only in thesystem with the proportional controller, when introduction of thecontroller does not change the value of ω_(π). This circumstance isoften neglected, and the principle is applied to all types of PIDcontrol. We consider the following example that shows how theintroduction of the controller affects the results of tuning Example 1.We assume that the process is given by the following transfer function(which was used in a number of works as a test process):

$\begin{matrix}{{{W_{p}(s)} = {{\mathbb{e}}^{{- 2}s}\frac{1}{\left( {{2s} + 1} \right)^{5}}}},} & (1)\end{matrix}$

We find the first order plus dead time (FOPDT) approximating modelŴ_(p)(s) to the process (1) based on matching the values of the twotransfer functions at frequency ω_(π):

$\begin{matrix}{{{{\hat{W}}_{p}(s)} = \frac{K_{p}{\mathbb{e}}^{- {\tau s}}}{{T_{p}s} + 1}},} & (2)\end{matrix}$where K_(p) is the process static gain, T_(v) is the time constant, andτ is the dead time. Let us apply method (J. G. Ziegler, and N. B.Nichols, “Optimum settings for automatic controllers”, Trans. Amer. Soc.Mech. Eng., Vol. 64, 1942, pp. 759-768) to the tuning of process (1) andnote that both (1) and (2) should produce the same ultimate gain andultimate frequency in the Ziegler-Nichols closed-loop test or the samevalues of the amplitude and the ultimate frequency in the RFT (K. J.Astrom and T. Hagglund, “Automatic tuning of simple regulators withspecifications on phase and amplitude margins,” Automatica, 20, 1984, p.645-651). This problem has infinite number of solutions, as there arethree unknown parameters of (2) and only two measurements obtained fromthe test. Assume that the value of the process static gain is known:K_(p)=1, and determine T_(p) and τ. These parameters can be found fromthe following equation:Ŵ _(p)(jω _(π))=W _(p)(jω _(π)),where ω_(π) is the phase cross-over frequency for both transferfunctions. Therefore, arg W_(p)(jω_(π))=−π. The value of ω_(π) is 0.283,which gives W_(p)(jω_(π))=(−0.498,j0), and thefirst-order-plus-dead-time (FOPDT) approximation is, therefore, asfollows (found via solution of the set of two algebraic equations):

$\begin{matrix}{{{\hat{W}}_{p}(s)} = {\frac{{\mathbb{e}}^{{- 7.393}s}}{{6.153s} + 1}.}} & (3)\end{matrix}$

The Nyquist plots of the process 1 given by formula (1) and itsapproximation 2 given by formula (3) are depicted in FIG. 1. The pointof intersection of the two plots (denoted as Ωhd 0) is also the point ofintersection with the real axis. Also Ω₀=ω_(π) for both process dynamics(1) and (3), and therefore Ŵ_(p)(jΩ₀)=W_(p)(jω₀). If the designedcontroller is of proportional type then the gain margins for processes(1) and (3) are the same. However, if the controller is of PI type thenthe stability margins for (1) and (2) are different. We illustrate thatbelow. We design the PI controller given by the following transferfunction:

$\begin{matrix}{{{W_{c}(s)} = {K_{c}\left( {1 + \frac{1}{T_{c}s}} \right)}},} & (4)\end{matrix}$using the Ziegler-Nichols tuning rules (J. G. Ziegler, and N. B.Nichols, “Optimum settings for automatic controllers”, Trans. Amer. Soc.Mech. Eng., Vol. 64, 1942, pp. 759-768). This results in the followingtransfer function of the controller:

$\begin{matrix}{{{W_{c}(s)} = {0.803\left( {1 + \frac{1}{17.76s}} \right)}},} & (5)\end{matrix}$

The Nyquist plot of the open-loop systems containing the process (1) andthe controller (5) denoted as 1 and the Nyquist plot of the open-loopsystems containing the process approximation (3) denoted as 2 aredepicted in FIG. 2. It follows from the frequency-domain theory oflinear systems and the used tuning rules that the mapping of point Ω₀ inFIG. 1 into point Ω₀ in FIG. 2 is done via clockwise rotation of vector{right arrow over (W)}_(p)(jΩ₀) by the angle ψ=arctan(1/(0.8·2π))=11.25°and multiplication of its length by such value, so that its lengthbecomes equal to 0.408. However, for the open-loop system containing thePI controller, the points of intersection of the Nyquist plots of thesystem and of the real axis are different for the system with process(1) and with process approximation (3). They are shown as points Ω₁ andΩ₂ in FIG. 2. The mapping of these points to the Nyquist plots of theprocess and its approximation is shown in FIG. 1. Therefore, thestability margins of the systems containing a PI controller are not thesame any more. It is revealed as different points of intersection of theplots and of the real axis in FIG. 2. In fact, the position of vector{right arrow over (W)}_(ol)(jΩ₀)={right arrow over (W)}_(c)(jΩ₀){rightarrow over (W)}_(p)(jΩ₀) is fixed, but this vector does not reflect thestability of the system. As one can see in FIG. 2, the gain margin ofthe system containing the FOPDT approximation of the process is higherthan the one of the system with the original process. The consideredexample illustrates the drawback of methods of tuning based on themeasurements of process response in the critical point Ω₀. This drawbackis because of the shift of the critical point due to the introduction ofthe controller.

The present invention aims to eliminate the noted drawback by generatingoscillations in the critical point that is not necessarily located onthe real axis but in the point Ω₀, which would correspond to certaindesired phase lag of the process, so that the introduction of thecontroller is accounted for in the test itself.

It is proposed that the modified RFT should be designed as the followingcontrol:

$\begin{matrix}{{u(t)} = \left\{ \begin{matrix}{{h\mspace{14mu}{if}\mspace{14mu}{\sigma(t)}} \geq {\Delta_{1}\mspace{14mu}{or}\mspace{14mu}\left( {{{\sigma(t)} > {{- \Delta_{2}}\mspace{14mu}{and}\mspace{14mu}{u\left( {t -} \right)}}} = h} \right)}} \\{{{- h}\mspace{14mu}{if}\mspace{14mu}{\sigma(t)}} \leq {\Delta_{2}\mspace{14mu}{or}\mspace{14mu}\left( {{{\sigma(t)} < {\Delta_{1}\mspace{14mu}{and}\mspace{14mu}{u\left( {t -} \right)}}} = {- h}} \right)}}\end{matrix} \right.} & (6)\end{matrix}$where Δ₁=βσ_(max), Δ₂=−βσ_(min), σ_(max) and σ_(min) are last “singular”points of the error signal 2 (FIG. 3) corresponding to the last maximumand minimum values of σ(t) after crossing the zero level, β is apositive constant.

Assume that the reference signal r(t) 1 in the system containing theprocess 6, the control algorithm (modified RFT) 5, and the summer 7(FIG. 3), is zero and show that in the steady mode, the motions of thecontrol 3 provided by the algorithm 5 given by (6) and of the output 4are periodic. Apply the describing function (DF) method (Derek P.Atherton, “Nonlinear Control Engineering”, Van Nostrand Reinhod NewYork, 1982) to the analysis of motions in FIG. 3. Assume that the steadymode periodic, and show that this is a valid assumption by findingparameters of this periodic motion (Note: a rigorous proof is presentedin the article I. Boiko, L. Fridman, I. M. Castellanos, “Analysis ofsecond-order sliding mode algorithms in the frequency domain,” IEEETrans. Automat. Contr., Vol. 49, No. 6, pp. 946-950, 2004). If themotions in the system are periodic then σ_(max) and σ_(min) representthe amplitude of the oscillations: α₀=σ_(max)=−σ_(min), and theequivalent hysteresis value of the relay is Δ=Δ₁=Δ₂=βσ_(max)=−βσ_(min).The DF of the hysteretic relay is given as the following function ofamplitude α:

$\begin{matrix}{{{N(a)} = {{\frac{4h}{\pi\; a}\sqrt{1 - \left( \frac{\Delta}{a} \right)^{2}}} - {j\frac{4h\;\Delta}{\pi\; a^{2}}}}},{a > \Delta}} & (7)\end{matrix}$

However, the system FIG. 3 with control (6) is not a conventional relaysystem. This system has the hysteresis value that is unknown a-prioriand depends on the amplitude value: Δ=βα. Therefore, (7) can berewritten as follows:

$\begin{matrix}{{{N(a)} = {\frac{4h}{\pi\; a}\left( {\sqrt{1 - \beta^{2}} - {j\beta}} \right)}},} & (8)\end{matrix}$

The modified RFT will generate oscillations in the system under control(6). Parameters of the oscillations can be found from the harmonicbalance equation:

$\begin{matrix}{{{W_{p}\left( {j\Omega}_{0} \right)} = {- \frac{1}{N\left( a_{0} \right)}}},} & (9)\end{matrix}$where α₀ and Ω₀ are the amplitude and the frequency of the periodicmotions. The negative reciprocal of the DF is given as follows:

$\begin{matrix}{{- \frac{1}{N(a)}} = {{- \frac{\pi\; a}{4h}}\left( {\sqrt{1 - \beta^{2}} + {j\beta}} \right)}} & (10)\end{matrix}$

Finding a periodic solution in system FIG. 3 with control (6) has asimple graphic interpretation (FIG. 4) as finding the point ofintersection of the Nyquist plot of the process 1 and of the negativereciprocal of the DF 2, which is a straight line that begins in theorigin and makes a counterclockwise angle ψ=arcsin)β with the negativepart of the real axis. In the problem of analysis, frequency Ω₀ andamplitude α₀ are unknown variables and are found from the complexequation (9). In the problems of tuning, Ω₀ and α₀ are measured from themodified RFT, and on the basis of the measurements obtained the tuningparameters are calculated from Ω₀ and α₀.

The modified RFT allows for the exact design of the gain margin. Sincethe amplitude of the oscillations α₀ is measured from the test, theprocess gain at frequency Ω₀ can be obtained as follows:

$\begin{matrix}{{{{W_{p}\left( {j\Omega}_{0} \right)}} = \frac{\pi\; a_{0}}{4h}},} & (11)\end{matrix}$which after introduction of the controller will become the process gainat the critical frequency.

The PID controller transfer function is

$\begin{matrix}{{W_{c}(s)} = {{K_{c}\left( {1 + \frac{1}{T_{ic}s} + {T_{dc}s}} \right)}.}} & \;\end{matrix}$The tuning rules for a PID controller are then defined as follows:

$\begin{matrix}{{K_{c} = {c_{1}\frac{4h}{\pi\; a_{0}}}},{T_{ic} = {c_{2}\frac{2\pi}{\Omega_{0}}}},{T_{dc} = {c_{3}\frac{2\pi}{\Omega_{0}}}},} & (12)\end{matrix}$where c₁, c₂, and c₃ are constant parameters that define the tuningrule. It can be noted that if the tuning rules are assigned as (12) thenthe closed-loop system characteristics become invariant to the timeconstants of the process, so that if all time constants of the processwere increased by the factor α then the critical frequency woulddecrease by the same factor α, and the product of every time constant bythe critical frequency would remain unchanged. If the tuning rules (12)are used then the frequency response of the PID controller at Ω₀ becomes

$\begin{matrix}{{{W_{c}\left( {j\Omega}_{0} \right)} = {c_{1}\frac{4h}{\pi\; a_{0}}\left( {1 - {j\frac{1}{2\pi\; c_{2}}} + {{j2\pi}\; c_{3}}} \right)}},} & (13)\end{matrix}$so that if the tuning rules are established through the choice ofparameters c₁, c₂, and c₃, and the test provides oscillations of thefrequency Ω_(u) which is equal to the phase cross-over frequency ω_(π)of the open-loop system (including the controller), then the controllerphase lag at the frequency ω_(π)=Ω_(u) is constant and depends only onthe values of c₂, and c₃:

$\begin{matrix}\begin{matrix}{{\varphi_{c}\left( \omega_{\pi} \right)} = {\arctan\left( {{c_{3}T_{u}\Omega_{u}} - \frac{1}{c_{2}T_{u}\Omega_{u}}} \right)}} \\{= {\arctan\left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)}}\end{matrix} & (14)\end{matrix}$Tuning Rules for Specification on Gain Margin.

Let the specified gain margin be γ_(m)>1 (in absolute values). Thentaking absolute values of both sides of (13) and considering (11) weobtain the following equation:

$\begin{matrix}{{{\gamma_{m}c_{1}\sqrt{1 + \left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)^{2}}} = 1},} & (15)\end{matrix}$which is a constraint complementary to the tuning rules (11). To providethe specified gain margin, the modified RFT must be carried out withparameter

$\begin{matrix}\begin{matrix}{\beta = {{- \sin}\;\varphi_{c}\Omega_{0}}} \\{= {{- \sin}\mspace{14mu}{arc}\;{{tg}\left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)}}}\end{matrix} & (16)\end{matrix}$

In the example considered above, if we keep parameter c₂ the same as inZiegler-Nichols tuning rules (J. G. Ziegler, and N. B. Nichols, “Optimumsettings for automatic controllers”, Trans. Amer. Soc. Mech. Eng., Vol.64, 1942, pp. 759-768): c₂=0.8, then to obtain, for example, gain marginγ_(m)=2 the tuning parameter c₁ for the modified RFT should be selectedas c₁=0.49, and parameter)β for the test should be selected in a with(16) as)β=0.195. For any process, the system will have gain marginγ_(m)=2 (6 dB). Therefore, the modified RFT with parameter)β calculatedas (16) and tuning rules (12) satisfying the constraint (15) can ensurethe desired gain margin. However, (15) is an equation containing threeunknown variables, which gives one a freedom to vary parameters c₁, c₂,and c₃. Some optimal sets of tuning rule parameters c₁, c₂, and c₃ (forgain margin γ_(m)=2) that were obtained via simulations, along with thevalues of φ_(c) (Ω_(o)) and parameter)β for the test, are given inTable 1. One should note the difference between the values of thecritical frequency of the conventional RFT and the frequency ofoscillations in the modified RFT (except for the proportionalcontroller). Therefore, even if the coefficients c₂, c₃ of Table 1 havethe same values as corresponding coefficients of Ziegler-Nichols tuningrules (J. G. Ziegler, and N. B. Nichols, “Optimum settings for automaticcontrollers”, Trans. Amer. Soc. Mech. Eng., Vol. 64, 1942, pp. 759-768),they will actually produce different values of controller parametersT_(ic) and T_(dc). In fact, due to the negative value of φ_(c) (Ω₀) forthe PI controller (and consequently, lower frequency of oscillations ofthe modified RFT), one would get higher value of T_(ic) computed throughthe modified RFT and data of Table 1. And vice versa, due to thepositive value of φ_(c) (Ω₀) for the PID controller, one would get lowervalues of T_(ic) and T_(dc), computed through the modified RFT and dataof Table 1.

TABLE 1 Tuning rules for gain margin γ_(m) = 2 Controller c₁ c₂ c₃ φ_(c)(Ω₀) β P 0.50 0 0 0 0 PI 0.49 0.80 0 −11.2° 0.195 PID 0.46 0.50 0.1223.5° −0.399Tuning Rules for Specification on Phase Margin.

The relationship that would allow one to tune PID controllers withspecification on phase margin for the open-loop system can also bederived. Using the same format of the tuning rules (12), and consideringthat if the parameter β of the modified RFT is calculated from the sumof φ_(c) (Ω₀) and the phase margin φ_(m) as:

$\begin{matrix}\begin{matrix}{\beta = {\sin\;\left( {\phi_{m} - {\varphi_{c}\left( \Omega_{0} \right)}} \right)}} \\{{= {\sin\left( {\phi_{m} + {{arc}\;{{tg}\left( {\frac{1}{2\pi\; c_{2}} - {2\pi\; c_{3}}} \right)}}} \right)}},}\end{matrix} & (17)\end{matrix}$we formulate the constraint for the tuning rules ensuring φ_(m) asfollows:

$\begin{matrix}{{c_{1}\sqrt{1 + \left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)^{2}}} = 1.} & (18)\end{matrix}$

The graphical interpretation of modified RFT and tuning withspecification on phase margin are presented in FIG. 5, where the Nyquistplot of the process 5 intersects with the negative reciprocal of

the DF of the modified RFT 2 in the point that defines the circle ofradius

$R = {\frac{\pi\; a_{0}}{4h}3.}$

TABLE 2 Tuning rules for phase margin φ_(m) = 45° Controller c₁ c₂ c₃φ_(c) (Ω₀) β P 1.0 0 0 0° 0.707 PI 0.98 0.80 0 −11.2° 0.831 PID 0.920.50 0.12 23.5° 0.367

Therefore, if tuning rules (12) are subject to constraint (18) then atfrequency Ω₀ of the modified RFT: (a) the absolute value of theopen-loop frequency response, in accordance with (11), (13), is

$\begin{matrix}\begin{matrix}{{{W_{ol}\left( {j\Omega}_{0} \right)}} = {{{W_{c}\left( {j\Omega}_{0} \right)}}{{W_{p}\left( {j\Omega}_{0} \right)}}}} \\{= {\frac{\pi\; a_{\;}}{4h}c_{1}\frac{4h}{\pi\; a_{\;}}\sqrt{1 + \left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)^{2}}}} \\{{= {{c_{1}\sqrt{1 + \left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)^{2}}} = 1}},}\end{matrix} & \;\end{matrix}$that constitutes the magnitude cross-over frequency, and (b) the phaseof the open-loop frequency response isarg W _(ol)(jΩ ₀)=arg W _(c)(jΩ ₀)+arg W _(p)(jΩ₀)=−180°+(φ_(m)−φ_(c)(Ω₀))+φ_(c)(Ω₀)=−180°+φ_(m),which shows that the specification on the phase margin is satisfied.Assuming that the controller at frequency Ω₀ of the modified RFT shouldprovide the same phase response as at critical frequency of theconventional RFT, we can obtain the following values of parameters c₁,c₂, c₃ (see Table 2 for φ_(m)=45°. Like in the tuning with specificationon gain margin, one should note the difference between the values of thecritical frequency of the conventional RFT and the frequency ofoscillations in the modified RFT, which will result in different valuesof the controller parameters. The proposed method of tuning isillustrated by the following example.

Example 2

Consider the process transfer function (1) that was used in Example 1.(a) Apply the modified RFT with amplitude h=1, parameter)β=0.195 and c₁,c₂ values from Table 1 for tuning a PI controller with specification ongain margin γ_(m)=2. (b) After that use the modified RFT with amplitudeh=1, parameter)β=0.659 and c₁, c₂ values from Table 2 for tuning a PIcontroller with specification on phase margin φ_(m)=45°. The controllertuning that is done according to the presented method produces thefollowing results. (a) The modified RFT gives Ω₀=0.188 and α₀=0.393; fortuning with specification on gain margin the controller parameterscalculated per (12) are K_(c)=0.978, T_(ic)=26.74; (b) The modified RFTgives Ω₀=0.133 and α₀=0.544; for tuning with specification on gainmargin the controller parameters calculated per (12) are K_(c)=1.416,T_(ic)=37.85. The frequency response (Nyquist plots) of the open-loopsystems for the system tuned with specification on gain margin 1 and forthe system tuned with specification on gain margin 2, is presented inFIG. 6. One can see that, indeed, the gain margin is two for option “a”,and the phase margin is 45° for option “b”.

It was assumed above that the reference signal 1 in FIG. 3 was zero.Therefore, it can be further noted that the values of the control andthe process variable should be understood as increments from thecorresponding values in a steady operating point. To realize that, thesystem must be brought to a steady state first (by means of notoptimally tuned but stable PID controller). After that the modified RFTshould be carried out with increments of the control +h and −h from thevalue in the steady state. The amplitude of the oscillations must bemeasured with respect to the value of the process variable in the steadystate.

Eventually, the designed self-tuning PID (or another type) controller issupposed to be realized as a processor based (micro-computer orcontroller) device and all above formulas, the nonlinear element, thetuning rules are realized as computer programs with the use ofapplicable programming languages. The preferred embodiment of thecontroller is depicted in FIG. 7. The controller 1 has two A/Dconverters 2 and 3 on its input for the process output and set pointsignals respectively (alternatively it may have only one A/D converterfor the process output signal, and the set point may be realized withinthe controller software), a processor (CPU) 4, a read-only memory (ROM)5 for program storage, a random access memory (RAM) 6 for buffering thedata, an address/data/control bus 7 for data transfer to/from theprocessor, and an D/A converter 8 that converts digital control signalgenerated by the controller into analog format. The analog controlsignal is applied to the process 9 (to a control valve, etc.). Allelements of the controller interact with each other in a known manner.Some elements of the controller listed above (for example A/D and D/Aconverters) may be missing as well as the controller may also containelements other than listed above-depending on specific requirements andfeatures of the control system.

1. A method of tuning a proportional-integral-derivative controller,further referred to as a PID controller, having a transfer function$\begin{matrix}{{{W_{c}(s)} = {K_{c}\left( {1 + \frac{1}{T_{ic}s} + {T_{dc}s}} \right)}},} & \;\end{matrix}$ where s is a Laplace variable and K_(c), T_(ic), andT_(dc) are tuning parameters, for a process in a feedback control systemcomprising the steps of: (a) selection of a desired gain margin γ_(m) ofthe system for tuning for a gain margin specification or desired phasemargin φ_(m), of the system for tuning for a phase margin specification;(b) determining the values of the parameters c₁, c₂, and c₃ that defineoptimal tuning rules of the PID controller from the desired gain marginγ_(m) of the system for tuning for a gain margin specification or thedesired phase margin φ_(m) of the system for tuning for a phase marginspecification selected at the previous step; (c) bringing the controlsystem into symmetric self-excited oscillations of a frequency at whicha phase response of the process is equal to the desired value equal toψ−180°, where −90°<ψ<90°; (d) measurement of a frequency of theoscillations Ω₀, and an amplitude of the oscillations α₀; (e)calculation of the tuning parameters of the PID controller in dependenceon the measurements obtained at the previous step.
 2. The method asrecited in claim 1, wherein said parameters c₁, c₂, and c₃ that definethe tuning rules are selected from the following table for tuning forthe gain margin specification γ_(m)=2 for a proportional,proportional-integral, and PID controllers, respectively, Controller c₁c₂ c₃ Proportional 0.50 0 0 Proportional-integral 0.49 0.80 0 PID 0.460.50 0.12


3. The method as recited in claim 1, wherein said parameters c₁, c₂, andc₃ that define the tuning rules are selected from the following tablefor tuning for the phase margin specification Φ_(m)=45° for aproportional, proportional-integral, and PID controller, respectively,Controller c₁ c₂ c₃ Proportional 1.0 0 0 Proportional-integral 0.98 0.800 PID 0.92 0.50 0.12


4. The method as recited in claim 1, wherein said parameters c₂, and c₃that define the tuning rules are selected from the table for aproportional-integral and PID controller, respectively, Controller c₂ c₃Proportional- 0.80 0 integral PID 0.50 0.12

plus or minus 20% and parameter c₁ is calculated for tuning for a gainmargin specification as follows:$c_{1} = {\frac{1}{\gamma_{m}\sqrt{1 + \left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)^{2}}}.}$5. The method as recited in claim 1, wherein said parameters c₂, and c₃that define the tuning rules are selected from the table for aproportional-integral and PID controller, respectively, Controller c₂ c₃Proportional- 0.80 0 integral PID 0.50 0.12

plus or minus 20%, and parameter c₁ is calculated for tuning for a phasemargin specification as follows:$c_{1} = {\frac{1}{\sqrt{1 + \left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)^{2}}}.}$6. The method as recited in claim 1, wherein said bringing the controlsystem into symmetric self-excited oscillations is done via theintroduction into the system the following control algorithm furtherreferred to as modified relay feedback test with parameter β, in serieswith the process, so that the error signal σ is the difference betweenthe set point and the process control variable, the error signal is aninput to the modified relay feedback test, and the output u of themodified relay feedback test is an input to the process:${u(t)} = \left\{ \begin{matrix}h & {{{if}\mspace{14mu}{\sigma(t)}} \geq {\Delta_{1}\mspace{14mu}{or}\mspace{14mu}\left( {{{\sigma(t)} > {{- \Delta_{2}}\mspace{14mu}{and}\mspace{14mu}{u\left( {t -} \right)}}} = h} \right)}} \\{- h} & {{{if}\mspace{14mu}{\sigma(t)}} \leq {\Delta_{2}\mspace{14mu}{or}\mspace{14mu}\left( {{{\sigma(t)} < {\Delta_{1}\mspace{14mu}{and}\mspace{14mu}{u\left( {t -} \right)}}} = {- h}} \right)}}\end{matrix} \right.$ where t is current time, Δ₁=βσ_(max),Δ₂=−βσ_(min), σ_(max) and σ_(min) are last singular points of the errorsignal σ(t) corresponding to the last maximum and minimum values ofσ(t), respectively, after crossing the zero level, h is the controlamplitude, u(t−) is the output of the modified relay feedback test attime immediately preceding current time, and parameter βof the modifiedrelay feedback test is computed as β=sinψ, ψ is a parameter.
 7. Themethod as recited in claim 6, wherein said parameter ψ is calculated asfollows:$\psi = {{- {arc}}\;{{tg}\left( {{2\pi\; c_{3}} - \frac{1}{2\pi\; c_{2}}} \right)}}$for tuning for the gain margin specification.
 8. The method as recitedin claim 6, wherein said parameter ψ is calculated as follows:$\psi = {\phi_{m} + {{arc}\;{{tg}\left( {\frac{1}{2\pi\; c_{2}} - {2\pi\; c_{3}}} \right)}}}$for tuning for the phase margin specification.
 9. The method as recitedin claim 6, wherein said tuning parameters are calculated as follows:${K_{c} = {c_{1}\frac{4h}{\pi\;{a_{0}}_{\;}}}},{T_{ic} = {c_{2}\frac{2\pi}{\Omega_{0}}}},{T_{dc} = {c_{3}{\frac{2\pi}{\Omega_{0}}.}}}$10. The method as recited in claim 6, wherein said output of themodified relay feedback test and the process control variable areincrements from the corresponding values in a steady operating point towhich in a preferred embodiment the control system is brought by meansof not optimally tuned but stable PID controller.